******************************************************************************
			               MO-SAStrE
Multiobjective Optimizer for Sequence Alignments using Structural Evaluations
                     (version 2.0, April 2013)

******************************************************************************

This README contains help to run MO-SAStrE
 
******************************************************************************

Description:
------------

This program has been developed with Matlab 7.11.0 (R2010b). The MATLAB function 
MOSAStrE.m optimizes a set of input alignments. The input data must be several 
FASTA or GCG file including those alignments to optimize.

This function applies the NSGA-II evolutionary algorithm which was described in the paper:
          "Optimizing multiple sequence alignments with a multobjective 
	         evolutionary algorithm based on structural information" 
			   
This function uses the Matlab toolbox for multiobjective genetic algorithms. 

Usage (Example):
----------------

% Build array with paths of alignment files. We have applied alignments for eight 
% known methodologies: 
% ClustalW, Muscle, TCoffee, ProbCons, FSA, RetAlign, Mafft and Kalign.
alignments = [{'./Example/BB20020_clustalw.msf'}; {'./Example/BB20020_muscle.msf'};
{'./Example/BB20020_tcoffee.msf'}; {'./Example/BB20020_probcons.msf'};...
{'./Example/BB20020_fsa.msf'}; {'./Example/BB20020_retalign.msf'};...
{'./Example/BB20020_mafft.msf'}; {'./Example/BB20020_kalign.msf'}];

% Run MO-SAStrE using contact file (optimal run):
opt_alignment = MOSAStrE(alignments,'CONTACTS',{'./Example/BB20020_contacts.txt'});

% The procedure can also run without such information but it then needs additional information: 
% 1) Calculate contacts providing one structure (slower).
opt_alignment = MOSAStrE(alignments,'STRUCTURES',{'./Example/1mrj_.pdb'});

% 2) Calculate contacts providing all the structures (slower).
structures = [{'./Example/1mrj_.pdb'}; {'./Example/1apg_A.pdb'}; {'./Example/1abr_A.pdb'};
{'./Example/1qi7_A.pdb'}; {'./Example/1apa_.pdb'}; {'./Example/1dm0_A.pdb'}];
opt_alignment = MOSAStrE(alignments,'STRUCTURES',structures);

% 3) Download structures and calculate contacts from provided structures (slower).
opt_alignment = MOSAStrE(alignments);

% The optimized alignment can be saved in a file:
multialignwrite('./Example/Optimized_Alignment.msf',opt_alignment);